import { createSlice } from '@reduxjs/toolkit'

const initialState = {
    name: '',
    pic: '',
}

export const counterSlice = createSlice({
    name: 'user',
    initialState,
    reducers: {
        setuse(state, actions) {
            state.name = actions.payload.name
            state.pic = actions.payload.pic
        }
    },
})

// Action creators are generated for each case reducer function
export const { setuse } = counterSlice.actions

export default counterSlice.reducer